﻿using My.Admin.Model.System;
using My.Admin.Service.System.IService;
using My.Core.DynamicProxy;

namespace My.Admin.Service.System
{							  
	public class UserService : BaseService<User>, IUserService
	{
		public UserService()
		{

		}

		/// <summary>
		/// 登录验证
		/// </summary>
		/// <param name="loginBody"></param>
		/// <returns></returns>
		public User Login(string name, string pass)
		{
			User user = GetFirst(it => it.account == name && it.password == pass);

			if (user == null || user.id <= 0)
			{
				return null;
			}

			return user;
		}
	}
}
